package com.qtrue.exer;

/**
 * @Package: com.qtrue.exer
 * @ClassName: StringTest
 * @Author: xiaoBao
 * @CreateTime: 2022-05-17 16:28
 * @Description:关于String类的一道面试题
 */
public class StringTest {
    String str = new String("good");
    char[] ch = {'t','e','s','t'};

    public void change(String str,char ch[]){
        str = "test ok";
        ch[0] = 'b';
    }

    public static void main(String[] args) {
        StringTest st = new StringTest();
        st.change(st.str, st.ch);
        System.out.println(st.str); // good
        System.out.println(st.ch); // best
    }
}
